﻿using SDF.Data.Mapping;
using SDF.Plugin.Misc.DynamicEntity.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SDF.Plugin.Misc.DynamicEntity.Data.Map
{
    public class DynamicEntityHeaderMap : SDFEntityTypeConfiguration<DynamicEntityHeader>
    {
        public DynamicEntityHeaderMap()
        {
            this.ToTable("DynamicEntity");
            this.HasKey(t => t.Id);
            this.Property(t => t.CodeName).IsRequired().HasMaxLength(255);
            this.Property(t => t.Name).HasMaxLength(255);
            this.Property(t => t.Description).HasMaxLength(2500);
            this.Property(t => t.SAPInstance).HasMaxLength(6);
        }

        protected override void PostInitialize()
        {
            base.PostInitialize();
        }
    }
}